package com.achen.controller;

import com.achen.pojo.User;
import com.achen.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author limeng
 * @create 2021-06-28 14:59
 */
@RestController
@Slf4j
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/user/findAll")
    public String findAll() {
        List<User> all = userService.findAll();
        log.info("用户列表:[{}]", all.toString());
        return "ok";
    }
}
